package com.springboot.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.blog.beans.Blog;
import com.springboot.blog.beans.BlogComment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentDao extends BaseMapper<BlogComment> {

    //分页查询
    List<BlogComment> queryCommentForItems(@Param(value = "begin") int begin, @Param(value = "pageSize") Integer pageSize);

    //根据文章ID查询评论
    List<BlogComment> findBlogComment(String blogId);

    //根据文章ID查询评论条数
    int contentByIdCount(String blogId);
}
